﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
using System.ComponentModel;
using System.Text;



namespace Coevery.Tasacion.Models
{

    public class InmuebleIdealistaRecord
    {
        /* 
              InmuebleIdealistaId    AbrAddress       Address         Agency      AgentLogo       Bathrooms
              Condition              Country          Description     Distance    District        FavComment
              Favourite              Floor            HasVideo        Latitude    Longitude       Munipality
              Neighborhood           NumPhotos        Operation       PhotosUrl   Position        Price
              PropertyCode           PropertyType     PropertyTypeCodeProvince    Region          Rooms
              ShowAddress            Size             Subregion       Thumbnail   TipUsuCd        Url
              UserCode               VideoType        InmuebleId
           */

        public InmuebleIdealistaRecord()
        {
            //this.fotoes = new FotoRecord[20];
        }

        public virtual int Id { get; set; } // PK
        public virtual int ViviendaPartRecord_Id { get; set; } // FK
        public virtual string AbrAddress { get; set; }
        public virtual string Address { get; set; }
        public virtual bool Agency { get; set; }
        public virtual string AgentLogo { get; set; }
        public virtual string Condition { get; set; }
        public virtual string Bathrooms { get; set; }
        public virtual string Country { get; set; }
        public virtual string Description { get; set; }
        public virtual string Distance { get; set; }
        public virtual string District { get; set; }
        public virtual string FavComment { get; set; }
        public virtual bool Favourite { get; set; }
        public virtual string Floor { get; set; }
        public virtual bool HasVideo { get; set; }
        public virtual string Latitude { get; set; }
        public virtual string Longitude { get; set; }
        public virtual string Munipality { get; set; }
        public virtual string Neighborhood { get; set; }
        public virtual string NumPhotos { get; set; }
        public virtual string Operation { get; set; }
        public virtual string PhotosUrl { get; set; }
        public virtual string Position { get; set; }
        public virtual string Price { get; set; }
        public virtual string PropertyCode { get; set; }
        public virtual string PropertyType { get; set; }
        public virtual string PropertyTypeCode { get; set; }
        public virtual string Province { get; set; }
        public virtual string Region { get; set; }
        public virtual string Rooms { get; set; }
        public virtual bool ShowAddress { get; set; }
        public virtual string Size { get; set; }
        public virtual string Subregion { get; set; }
        public virtual string Thumbnail { get; set; }
        public virtual string TipUsuCd { get; set; }
        public virtual string Url { get; set; }
        public virtual string UserCode { get; set; }
        public virtual string VideoType { get; set; }
        protected internal virtual double AveragePrice {
            get
            {
                return Double.Parse(this.Price) / Double.Parse(this.Size);
            }
        }
        //public virtual FotoRecord[] fotoes { get; set; }
    }
}